/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author itachiu
 */
@Embeddable
public class AppointmentPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idAPPOINTMENT")
    private int idAPPOINTMENT;
    @Basic(optional = false)
    @Column(name = "MEDICAL_RECORD_idMEDICAL_RECORD")
    private int mEDICALRECORDidMEDICALRECORD;

    public AppointmentPK() {
    }

    public AppointmentPK(int idAPPOINTMENT, int mEDICALRECORDidMEDICALRECORD) {
        this.idAPPOINTMENT = idAPPOINTMENT;
        this.mEDICALRECORDidMEDICALRECORD = mEDICALRECORDidMEDICALRECORD;
    }

    public int getIdAPPOINTMENT() {
        return idAPPOINTMENT;
    }

    public void setIdAPPOINTMENT(int idAPPOINTMENT) {
        this.idAPPOINTMENT = idAPPOINTMENT;
    }

    public int getMEDICALRECORDidMEDICALRECORD() {
        return mEDICALRECORDidMEDICALRECORD;
    }

    public void setMEDICALRECORDidMEDICALRECORD(int mEDICALRECORDidMEDICALRECORD) {
        this.mEDICALRECORDidMEDICALRECORD = mEDICALRECORDidMEDICALRECORD;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idAPPOINTMENT;
        hash += (int) mEDICALRECORDidMEDICALRECORD;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AppointmentPK)) {
            return false;
        }
        AppointmentPK other = (AppointmentPK) object;
        if (this.idAPPOINTMENT != other.idAPPOINTMENT) {
            return false;
        }
        if (this.mEDICALRECORDidMEDICALRECORD != other.mEDICALRECORDidMEDICALRECORD) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.AppointmentPK[ idAPPOINTMENT=" + idAPPOINTMENT + ", mEDICALRECORDidMEDICALRECORD=" + mEDICALRECORDidMEDICALRECORD + " ]";
    }
    
}
